import React from 'react';
import { Navigate } from 'react-router-dom';

export default function Auth({ children }: any) {
  return localStorage.getItem('token') ? children : <Navigate to="/login" />;
}
